#!/bin/sh
echo
echo "    Building report"
./clean.sh
pdflatex -interaction batchmode -file-line-error -halt-on-error -output-directory=. -output-format=pdf manual.tex > /dev/null && pdflatex -interaction batchmode -file-line-error -halt-on-error -output-directory=. -output-format=pdf manual.tex > /dev/null
if [ $? -eq 0 ]; then
	echo
	echo "    Cleaning auxiliary files!"
	./clean.sh
	echo
	echo "    Done building report!"
	echo
else
	echo
	echo "    An error occured building the report!"
	echo	
fi
exit $?
